package com.wteam.dragon.shop.search.repository;

import com.wteam.dragon.shop.search.bean.EsProduct;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.elasticsearch.repository.ElasticsearchRepository;

/**
 * @Author 陈晓辉
 * @Date 2021/3/27 9:31
 */
public interface EsProductRepository extends ElasticsearchRepository<EsProduct, Long> {

    /**
     *
     * @param name 商品名
     * @param subhead 商品副标题
     * @param keywords 关键字
     * @param pageable 商品分页
     * @return
     */
    Page<EsProduct> findByNameOrSubheadOrKeywords(String name, String subhead, String keywords, Pageable pageable);
}
